package main

import (
	"coffelang/compiler/parser"
	"fmt"
	"log"
	"strings"
)

func main() {
	fmt.Println("this is coffelang !")

	// ----------------------------------
	//source := "(10+200) > ${var1}"
	source := "(10-200) > ${var1}"
	r := strings.NewReader(source)

	scanner := parser.NewScanner(r, source)

	for {
		token, err := scanner.ScanT()
		if err != nil {
			log.Println(err)
			break
		}
		if token.Type == -1 {
			break
		}
		log.Printf("%#v\n", token)
	}
}
